import './styles/index.scss';

import { createFromIconfontCN } from '@ant-design/icons-vue';
import { createApp } from 'vue';
import './style.css';
import { createPinia } from 'pinia';
import App from './App.vue';
import rootRoutes from './router/routes';
import antd, { message } from 'ant-design-vue';

import '@kangc/v-md-editor/lib/style/base-editor.css';
import VueMarkdownEditor from '@kangc/v-md-editor';
import vuepressTheme from '@kangc/v-md-editor/lib/theme/vuepress.js';
import '@kangc/v-md-editor/lib/theme/style/vuepress.css';
import VMdPreview from '@kangc/v-md-editor/lib/preview';
import githubTheme from '@kangc/v-md-editor/lib/theme/github.js';
import hljs from 'highlight.js';
import '@kangc/v-md-editor/lib/theme/style/github.css';


VMdPreview.use(githubTheme, {
  Hljs: hljs,
});

const IconFont = createFromIconfontCN({
  scriptUrl: '/assets/font/iconfont.js',
  extraCommonProps: { class: 'd-iconfont' },
});

const app = createApp(App);
app.use(VMdPreview);
app.use(antd);
app.component('IconFont', IconFont);
app.use(createPinia());
app.use(rootRoutes);

app.mount('#app');
